package com.example.hrsystem.model;

import androidx.room.Entity;
import androidx.room.PrimaryKey;
import androidx.room.Ignore;
import androidx.room.TypeConverters;

import com.example.hrsystem.data.source.DateTypeConverters;

import java.util.Date;

/**
 * 日常考勤记录实体类
 * 用于表示员工每日的打卡情况
 */
@Entity(tableName = "daily_attendance_records")
@TypeConverters({DateTypeConverters.class})
public class DailyAttendanceRecord {
    @PrimaryKey(autoGenerate = true)
    private int id;
    
    private String employeeId;
    private Date date;
    private String status; // 正常/异常
    private String checkInTime;
    private String checkOutTime;
    private String remark; // 备注信息
    
    // 构造函数
    @Ignore
    public DailyAttendanceRecord() {}
    
    public DailyAttendanceRecord(String employeeId, Date date, String status, String checkInTime, String checkOutTime, String remark) {
        this.employeeId = employeeId;
        this.date = date;
        this.status = status;
        this.checkInTime = checkInTime;
        this.checkOutTime = checkOutTime;
        this.remark = remark;
    }
    
    // Getter和Setter方法
    public int getId() {
        return id;
    }
    
    public void setId(int id) {
        this.id = id;
    }
    
    public String getEmployeeId() {
        return employeeId;
    }
    
    public void setEmployeeId(String employeeId) {
        this.employeeId = employeeId;
    }
    
    public Date getDate() {
        return date;
    }
    
    public void setDate(Date date) {
        this.date = date;
    }
    
    public String getStatus() {
        return status;
    }
    
    public void setStatus(String status) {
        this.status = status;
    }
    
    public String getCheckInTime() {
        return checkInTime;
    }
    
    public void setCheckInTime(String checkInTime) {
        this.checkInTime = checkInTime;
    }
    
    public String getCheckOutTime() {
        return checkOutTime;
    }
    
    public void setCheckOutTime(String checkOutTime) {
        this.checkOutTime = checkOutTime;
    }
    
    public String getRemark() {
        return remark;
    }
    
    public void setRemark(String remark) {
        this.remark = remark;
    }
}